fix(reclaim): verify_target tiers typed holds (composition bug from #21+#22) #23
+38
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix:
verify_targettiers typed holds (composition bug from merging #21 + #22)Merging slice-3 (#21,
verify_target) and typed holds (#22) composed a latent bug:#22 makes
load_holdsreturn typed dict entries, butverify_targetstill did inlinestring matching (
h in source_folder), which raises TypeError on a dict hold. Soverify_targetwould crash on any routed target the moment areclaim_holds.jsonis used.Legacy
.txt(string) holds are unaffected, which is why the merged 235-test suite stayedgreen and it went unseen.
Fix: route
verify_targetthrough the samehold_entry_for+classify_holdhelpersverify()uses, so routed targets get the full business / promote-pending / supersededtiering (
HOLD/AWAITING-APPROVAL) instead of a flat, crash-prone string match.Tests (+3):
verify_targetunder a business dict hold → HOLD; promote-pending no-receipt →HOLD; promote-pending valid-receipt → AWAITING-APPROVAL. Suite 235 → 238.
Base
main, not stacked. This is the "apply tiering to verify_target once #21 lands"follow-up I flagged — closing it now so
mainis correct before anyone deploys JSON holds.🤖 Generated with Claude Code